package vip.web3.common.constants;


import java.util.HashSet;
import java.util.Set;

public class RedisConstant {

    /**
     * 当前销毁值, 每隔 20 秒 递减 20
     */
    public static final String CURRENT_DESTROY_RBT = "CURRENT_DESTROY_RABBIT";
    public static final String CURRENT_MARK_POWER = "CURRENT_MARK_POWER";
    public static final String CURRENT_TOTAL_POWER = "CURRENT_TOTAL_POWER";

    public static final String CURRENT_RBT_PRICE = "CURRENT_RBT_PRICE";

    public static final String SOLANA_USDT_RECHARGE_ADDRESS = "solana_usdt_recharge_address";

    public static final String BSC_USDT_RECHARGE_ADDRESS = "bsc_usdt_recharge_address";

    public static final String USER_LEVEL_URL = "user_level_url_";

    public static final String USER_IDENTITY_URL = "user_identity_url_";

    public static final String DOWNLOAD_WEBSITE_URL = "download_website_url";

    public static final String VIRTUALLY_ADD_RBT = "virtually_add_rbt";

    public static final String LAST_TOTAL_BASIC_RBT_REWARD = "LAST_TOTAL_BASIC_RBT_REWARD";

    /**
     * 过期时间
     */
    public static final long EXPIRE_TIME_5_MINUTE = 300;


    /**
     * K线分钟
     */
    public static Set<String> minutes = new HashSet<>();

    static {
        minutes.add("1");
        minutes.add("5");
        minutes.add("15");
        minutes.add("30");
        minutes.add("60");
        minutes.add("1440");
        minutes.add("10080");
        minutes.add("43200");
    }

    /**
     * 获取成功交易的key
     *
     * @param tmi
     * @return
     */
    public static String getSuccesseEntrustKey(String tmi) {
        return "TRADE:SUCCESSE:ENTRUST:" + tmi;
    }

    /**
     * 交易对统计信息
     *
     * @param tmi
     * @return
     */
    public static String getTradeMarket(String tmi) {
        return "TRADE:MARKET:" + tmi;
    }

    /**
     * K线最后值
     *
     * @param tmi
     * @return
     */
    public static String getLastKline(String tmi, String minute) {
        return "TRADE:LAST:KLINE:" + tmi + ":" + minute;
    }
}
